// 入口文件
import Vue from "vue";
import App from "./App.vue";
import "./styles/global.less";
import router from "./router";
import { showMessage } from "@/utils";
import vLoading from "./directives/loading";
import vLazy from "./directives/lazy";
import store from "./store";
import "./eventBus";
// import './mock';

// 注册全局指令
Vue.directive("loading", vLoading);
Vue.directive("lazy", vLazy);

store.dispatch("setting/fetchSetting");
Vue.prototype.$showMessage = showMessage;
new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
